package com.kingmed.kmss.admin.job.jobhandler;


import com.kingmed.kmss.admin.modules.ums.service.UmsHrOrgService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;


@Slf4j
@Component
public class HROrgDataJobHandler {

	@Autowired
	private UmsHrOrgService hrOrgService;
	
	@XxlJob("xxl-job-executor-kmss-admin-hr-org")
	public void refreshHROrgList() {
		log.info("HROrgDataJobHandler_job 开始运行");
		try {
			hrOrgService.refreshHROrgList();
		} catch (Exception e) {
			log.error("HROrgDataJobHandler_job 运行异常", e);
		}
		
		log.info("HROrgDataJobHandler_job 运行结束");
	}
}
